package sjd.ahsj.springbootmybatisplusoracle.config;

import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Controller;

import java.util.Date;

/**
 * 自动填充
 *
 * @author zhanghaogao
 * @create 2017-11-28 下午4:36
 **/
@Controller
public class MyMetaObjectHandler extends MetaObjectHandler {



    @Override
    public void insertFill(MetaObject metaObject) {
//        Object crtTime = metaObject.getValue("crtTime");
//        if (null == crtTime) {
//            metaObject.setValue("crtTime", new Date());
//        }


    }


    @Override
    public void updateFill(MetaObject metaObject) {


    }
}
